return Class {
   init = function (self, name)
      self:load_deck_file (name)
   end,
   
   load_deck_file = function (self, name)
      local filename = name or "default"
      local deck = "src/decks/"..filename..".deck"
      local units = {}
      for line in $LF.lines(deck) do 
	 local u_name = string.match(line, ".+")
	 lume.push(units, u_name)
      end
      self.units = lume.unique(units)
   end,
   
   is_unit_in_deck = function (self, name)
      if not self.units or not name then return end
      return @@ANY(self.units, v == name)
   end,

   list = function (self)
      local list = @@MAP(self.units, return Game:get_unit(v))
      return list
   end,

   list_names = function (self)
      local list = @@MAP(self.units, return Game:get_unit(v)[1])
      return list
   end

}
